#include "mycallback.h"
#include <QDateTime>

MyCallback::MyCallback(QObject *parent) :
    Sbs2Callback(parent)
{
}

void MyCallback::getData(Sbs2Packet *packet)
{
    thisPacket = packet;
    ++currentPacket;
    if (((packet->counter - currentPacketCounter-1)%129) != 0)
	qDebug() << "DUPA "<<packet->counter - currentPacketCounter;
    currentPacketCounter = packet->counter;

    if (currentPacket%32 == 0)
    {
	m = QString::number(currentPacket)+" "+QString::number(currentPacketCounter)+" "+QString::number(QDateTime::currentMSecsSinceEpoch());
	qDebug() << m;
	//emit ping(m);
    }

}
